<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.goodfox.com/jsp/tags/power" prefix="p"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%
request.setAttribute("locale",request.getLocale());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>打印预览</title>

<link href="<c:url value="/resources/themes/default/style.css"/>" rel="stylesheet" type="text/css" media="screen"/>
<link href="<c:url value="/resources/themes/css/core.css"/>" rel="stylesheet" type="text/css" media="screen"/>
<link href="<c:url value="/resources/themes/css/print.css"/>" rel="stylesheet" type="text/css" media="print"/>
<link href="<c:url value="/resources/themes/css/main.css"/>" rel="stylesheet" type="text/css" media="screen"/>
<!--[if IE]>
<link href="<c:url value="/resources/themes/css/ieHack.css"/>" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->

<script src="<c:url value="/resources/js/jquery-1.7.1.js"/>" type="text/javascript"></script>
<script type="text/javascript">
function doPrint(){
	document.all.WebBrowser.ExecWB(6,6)
}
function doPrintSetting(){
	document.all.WebBrowser.ExecWB(8,1)
}
function doPrintPreview(){
	document.all.WebBrowser.ExecWB(7,1)
}
var d = new Date();
$(function(){
	$(".printContent>div>table>tbody>tr>td:odd").css({
		"border-bottom":"1px solid #333",
		//"text-decoration":"underline",
		"width":"32%",
		"padding-left":"1em"
	});
	$(".printContent>div>table>tbody>tr>td:even").css({
		"width":"18%",
		"padding-left":"1em"
	});
	
	$("#nowdate").html(d.toLocaleDateString());
	
	$(".printThis").change(function(){
		var idx = $(this).closest("tr").index();
		if($(this).is(":checked")){
			$(".printContent").eq(idx).fadeIn(500);
		}else{
			$(".printContent").eq(idx).fadeOut(500);
		};
	});
});
</script>
</head>

<body style="overflow:auto;background:#fff;">
<object id='WebBrowser' classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' height=0 width=0></object>
<div class="ScreenOnly">
	<table width="100%">
		<caption>林地信息列表</caption>
		<thead>
			<tr>
				<th>是否打印</th>
				<th>林地信息</th>
				<th>申请表编号</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${rights.alWoodlandList}" var="woodland" varStatus="w">
			<tr>
				<td><input type="checkbox" name="checkbox" class="printThis" value="${w.index+1}" checked="checked" /></td>
				<td>林地信息${w.index+1}</td>
				<td>${woodland.appNumber}</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
</div>

<div class="ScreenOnly">
	<input type="button" value="打印" id="btnPrint" onclick="doPrint()" />
	<input type="button" value="页面设置" id="btnSetting" onclick="doPrintSetting()" />
	<input type="button" value="打印预览" id="btnPreview" onclick="doPrintPreview()" />
</div>
<hr />
<c:forEach items="${rights.alWoodlandList}" var="woodland" varStatus="w">
<div class="printContent PageNext">
	<div class="pageFormContent">
		<table width="100%">
			<!-- <caption class="PageHeader">林地信息表头啦啦啦啦</caption> -->
			<tbody>
				<tr>
					<td>林权证编号：</td>
					<td>${rights.rigCode}</td>
					<td>林权证号：</td>
					<td>${rights.rigNumber}</td>
				</tr>
				<tr>
					<td>法定代表人：</td>
					<td>${rights.legal}</td>
					<td>身份证号：</td>
					<td>${rights.idCards}</td>
				</tr>
				<tr>
					<td>单位（个人）：</td>
					<td>${rights.unit}</td>
					<td>通讯地址：</td>
					<td>${rights.address}</td>
				</tr>
			</tbody>
		</table>

		<table width="100%" style="border-top: 3px solid #333;">
			<tbody>
				<tr>
					<td>申请表编号：</td>
					<td>${woodland.appNumber}</td>
					<td>登记类型：</td>
					<td>${woodland.rstTypeTxt}</td>
				</tr>
				<tr>
					<td>是否抵押：</td>
					<td><c:if test="${woodland.mortgage==1}">是</c:if><c:if test="${woodland.mortgage==0}">否</c:if></td>
					<td>是否退耕还林地：</td>
					<td><c:if test="${woodland.backForest==1}">是</c:if><c:if test="${woodland.backForest==0}">否</c:if></td>
				</tr>
				<tr>
					<td>林地所有权权利人：</td>
					<td>${woodland.fstOwnTxt}</td>
					<td>林地使用权权利人：</td>
					<td>${woodland.fstUse}</td>
				</tr>
				<tr>
					<td>森林或林木所有权权利人：</td>
					<td>${woodland.woodOwn}</td>
					<td>森林或林木使用权权利人：</td>
					<td>${woodland.woodUse}</td>
				</tr>
				<tr>
					<td>坐落：</td>
					<td>${woodland.areaName}</td>
					<td>小地名：</td>
					<td>${woodland.smallTo}</td>
				</tr>
				<tr>
					<td>林班：</td>
					<td>${woodland.fstClass}</td>
					<td>小班：</td>
					<td>${woodland.smallCls}</td>
				</tr>
				<tr>
					<td>面积（亩）：</td>
					<td>${woodland.acreage}</td>
					<td>主要树种：</td>
					<td>${woodland.speciesTxt}</td>
				</tr>
				<tr>
					<td>蓄积或株数：</td>
					<td>${woodland.treesNum}</td>
					<td>造林年度：</td>
					<td><fmt:formatDate value="${woodland.affDate}" pattern="yyyy"/></td>
				</tr>
				<tr>
					<td>地类：</td>
					<td>${woodland.landTypeTxt}</td>
					<td>森林分类：</td>
					<td>${woodland.fstTypeTxt}</td>
				</tr>
				<tr>
					<td>林种：</td>
					<td>${woodland.fstSpeciesTxt}</td>
					<td>林地使用期（年）：</td>
					<td>${woodland.fstUseDate}</td>
				</tr>
				<tr>
					<td>终止日期：</td>
					<td><fmt:formatDate value="${woodland.endDate}" pattern="yyyy-MM-dd"/></td>
					<td>坡度：</td>
					<td>${woodland.slope}</td>
				</tr>
				<tr>
					<td>坡向：</td>
					<td>${woodland.aspect}</td>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td>四至：</td>
					<td>
						<table width="100%">
							<tbody>
								<c:forEach items="${woodland.alWoodlandFourList}" var="four">
								<tr>
									<td>${four.fourName}</td>
								</tr>
								</c:forEach>
							</tbody>
						</table>
					</td>
					<td>GPS坐标：</td>
					<td>
						<table width="100%">
							<tbody>
								<c:forEach items="${woodland.alWoodlandFourList}" var="four">
								<tr>
									<td>${four.sort}</td>
									<td>${four.corX}、${four.corY}</td>
								</tr>
								</c:forEach>
							</tbody>
						</table>
					</td>
				</tr>
				<tr>
					<td>主要权利依据：</td>
					<td colspan="3">${woodland.basis}</td>
				</tr>
				<tr>
					<td>林权共有者说明：</td>
					<td colspan="3">${woodland.explain}</td>
				</tr>
				<tr>
					<td>注记：</td>
					<td colspan="3">${woodland.note}</td>
				</tr>
			</tbody>
		</table>

		<div align="right" style="text-align: right; padding: 10px 30px 0 0; line-height: 2em;">
			鸡西市林权管理服务中心 <br /> 日期：<span id="nowdate">2012年7月3日</span>
		</div>
	</div>
</div>
</c:forEach>
</body>
</html>